import { request } from 'umi';

export interface StateType {
  status?: 'suc' | 'err';
  username?: 'guest' | 'admin' | 'xxx';
  usergroup?: 'sys' | 'user' | 'special';
}

export interface UserLoginParams {
  username: string;
  password: string;
}

export async function fakeLogin(params: UserLoginParams) {
  return request('/api/login', {
    method: 'POST',
    data: params,
  });
}
